#include<iostream>
#include<utility>
#include<algorithm>

using namespace std;

typedef long long LL;

LL n, m, k;
LL t[100005];
LL c[100005];
LL mx = 0;

bool jude(int val){
    int sum = 0;
    for(int i = 0; i < n; i ++){
        if(val > t[i]) continue;
        sum += (t[i] - val) * c[i];
        if(sum > m) return false;
    }
    return true;
}

int main(){
    cin >> n >> m >> k;
    for(LL i = 0; i < n; i ++){
        cin >> t[i] >> c[i];
        mx = max(mx, t[i]);
    }
    int l = k, r = mx;
    while(l <= r){
        int mid = (l + r) / 2;
        if(!jude(mid)){
            l = mid + 1;
        }
        else{
            r = mid - 1;
        }
    }
    cout << l << endl;
}